var { initObj, formatObj } = require('../libs/common');

var init = function (data) {
    return initObj(mod, data);
}

var format = function (data) {
    return formatObj(mod, data);
}

// 用户描述表
var mod = {
    pcode: {
        name: '关联员工code',
        type: 'string',
        length: 12
    },
    type: {//self_description: 自我描述、family_back: 家庭背景、hobby:兴趣爱好、ideal_partner:理想的另一半
        name: '类型',
        type: 'string',
        length: 200
    },
    remarks: {
        name: '描述',
        type: 'string',
        length: 500
    },
    createtime: {
        name: '创建时间',
        type: 'date',
        default: new Date()
    },
    updatetime: {
        name: '更新时间',
        type: 'date',
        default: new Date()
    }
};

module.exports = {
    init,
    format
};